﻿namespace LeadMaster.Controllers
{
  using System.Web.Mvc;
  using LeadMaster.Helpers;
  using LeadMaster.DAL;

  public class HomeController : Controller
  {
    private DunsmoreContext db = new DunsmoreContext();

    public ActionResult Index()
    {
      Maintenance.inMaintenance = false;
      if (this.User.Identity.Name==string.Empty)
      {
          return RedirectToAction("Login", "Account");
      }
      //MembershipUser currentUser = Membership.GetUser(User.Identity.Name, userIsOnline: true);

      //int? appleBrowser = db.ClientUsers.Where(m => m.UserID == (Guid)currentUser.ProviderUserKey).FirstOrDefault().AppleBrowser;

      ViewBag.Message = "Awesome. Just Awesome.";

      return View();
    }

    public ActionResult About()
    {
        ViewBag.Message = "Your app description page.";

        return View();
    }

    public ActionResult Contact()
    {
        ViewBag.Message = "Your contact page.";

        return View();
    }

    public ActionResult DailyTrackerReport()
    {
      return Redirect("../Reports/DailyTracker.aspx");
    }

    public ActionResult ShowDailyTracker()
    {

      return View();
    }
  }
}
